/*
dip neighbor
*/


#ifndef __dip_neighbor_h__
#define __dip_neighbor_h__

#include <assert.h>
#include <sys/types.h>
#include <config.h>
#include <lib/bsd-list.h>
#include <scheduler.h>
#include <dip/dip_rqueue.h>

#define CURRENT_TIME    Scheduler::instance().clock()
#define INFINITY2        0xff

/*
   DIP Neighbor Cache Entry
*/
class DIP_Neighbor {
        friend class DIP;
        friend class dip_rt_entry;
        
 public:
        DIP_Neighbor(u_int32_t a) { nb_addr = a;}

 protected:
        LIST_ENTRY(DIP_Neighbor) nb_link;
        nsaddr_t        nb_addr;
        double          nb_predic;
        double          nb_utility;
        double          nb_expire;      // ALLOWED_HELLO_LOSS * HELLO_INTERVAL
//        dip_rqueue      nb_queue;
};

LIST_HEAD(dip_ncache, DIP_Neighbor);



#endif /* _dip__neighbor_h__ */
